import config from "@/config"
import http from "@/utils/request"

export default {
    // 工序
    craft: {
		list: {
			url: `${config.API_URL}/adminapi/workman.WorkOrder/lists`,
			name: "获取工序",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/workman.WorkOrder/add`,
			name: "添加工序",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/workman.WorkOrder/edit`,
			name: "编辑工序",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/workman.WorkOrder/delete`,
			name: "删除工序",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/workman.WorkOrder/detail`,
			name: "工序详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 工序类别
    craftCate: {
		list: {
			url: `${config.API_URL}/adminapi/workman.WorkOrderCategory/lists`,
			name: "获取工序类别",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/workman.WorkOrderCategory/add`,
			name: "添加工序类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/workman.WorkOrderCategory/edit`,
			name: "编辑工序类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/workman.WorkOrderCategory/delete`,
			name: "删除工序类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 工艺路线
    workroute: {
		list: {
			url: `${config.API_URL}/adminapi/workman.WorkRoute/lists`,
			name: "获取工艺路线",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/workman.WorkRoute/all`,
			name: "获取工艺路线",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/workman.WorkRoute/add`,
			name: "添加工艺路线",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/workman.WorkRoute/edit`,
			name: "编辑工艺路线",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/workman.WorkRoute/delete`,
			name: "删除工艺路线",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/workman.WorkRoute/detail`,
			name: "工艺路线详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 工艺路线类别
    routeCate: {
		list: {
			url: `${config.API_URL}/adminapi/workman.WorkRouteCategory/lists`,
			name: "获取工艺路线类别",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/workman.WorkRouteCategory/add`,
			name: "添加工艺路线类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/workman.WorkRouteCategory/edit`,
			name: "编辑工艺路线类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/workman.WorkRouteCategory/delete`,
			name: "删除工艺路线类别",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 不良品信息
    rejects: {
		list: {
			url: `${config.API_URL}/adminapi/workman.Rejects/lists`,
			name: "获取不良品信息",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/workman.Rejects/all`,
			name: "获取不良品 -- 全部",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/workman.Rejects/add`,
			name: "添加不良品信息",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/workman.Rejects/edit`,
			name: "编辑不良品信息",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/workman.Rejects/delete`,
			name: "删除不良品信息",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/workman.Rejects/detail`,
			name: "不良品信息详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
}
